//
// Created by jsjxsy on 2022/8/17.
//
#include <iostream>
using namespace std;
struct Base {
};

struct Derived : public Base {
};
int main() {
  int arr[10];
  Derived d;
  Base *p = &d;
  cout << typeid(42).name() << endl;
  cout << typeid(arr).name() << endl;
  cout << typeid(string).name() << endl;
  cout << typeid(p).name() << endl;
  cout << typeid(*p).name() << endl;

  Derived t1, t2;
  if (typeid(t1) == typeid(t2)) {
    cout << "t1 == t2" << endl;
  } else {
    cout << "t1 != t2" << endl;
  }

  if (typeid(1).before(typeid(2))) {
    cout << "1 before 2" << endl;
  } else {
    cout << "2 before 1" << endl;
  }
  return 0;
}